package com.diandi.signature.enums.platfrom;

/**
 * Created by Administrator on 2017/7/6.
 */
public enum ProcessFlag {
    初始(0,"初始"),
    处理完成(1,"处理完成"),
    处理中(2,"处理中"),
    处理失败(3,"处理失败"),
    ;
    private int type;
    private String typeName;

    ProcessFlag(int type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public static ProcessFlag getEmun(int type){
        for (ProcessFlag processFlag : ProcessFlag.values()) {
            if(processFlag.getType() == type){
                return processFlag;
            }
        }
        return null;
    }
}
